package com.ruoyi.bzjgl.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.core.domain.TreeSelect;

import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;

public class TreeAjxz implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private String id;

    /** 节点名称 */
    private String label;

    private String remark;

    private String upId;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeAjxz> children;


    public TreeAjxz(LegalCaseBasic lega)
    {
        this.id = lega.getBh();
        this.label = lega.getMc();
        this.remark = lega.getBz();
        this.upId = lega.getSjbh();
        this.children = lega.getChildren().stream().map(TreeAjxz::new).collect(Collectors.toList());
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public List<TreeAjxz> getChildren() {
        return children;
    }

    public void setChildren(List<TreeAjxz> children) {
        this.children = children;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getUpId() {
        return upId;
    }

    public void setUpId(String upId) {
        this.upId = upId;
    }
}
